package com.windowes.weichang.utils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/***
 *
 * @author: yangqing
 * @email: qing.yang@bangdao-tech.com
 * @createTime: 2018/6/30 下午10:13
 * @description:
 *
 **/
public class AliSmsErrorHelper {


    private static Map<String, String> errorInfo = new ConcurrentHashMap<>();


    static {
        errorInfo.put("isv.OUT_OF_SERVICE", "业务停机");
        errorInfo.put("isv.ACCOUNT_NOT_EXISTS", "账户异常");
        errorInfo.put("isv.ACCOUNT_ABNORMAL", "业务停机");
        errorInfo.put("isv.SMS_TEMPLATE_ILLEGAL", "短信模板不合法");
        errorInfo.put("isv.SMS_SIGNATURE_ILLEGAL", "短信签名不合法");
        errorInfo.put("isv.INVALID_PARAMETERS", "参数异常");
        errorInfo.put("isp.SYSTEM_ERROR", "isp.SYSTEM_ERROR");
        errorInfo.put("isv.MOBILE_NUMBER_ILLEGAL", "非法手机号");
        errorInfo.put("isv.MOBILE_COUNT_OVER_LIMIT", "手机号码数量超过限制");
        errorInfo.put("isv.TEMPLATE_MISSING_PARAMETERS", "模板缺少变量");
        errorInfo.put("isv.BUSINESS_LIMIT_CONTROL", "同一个手机号码发送短信验证码，支持1条/分钟，5条/小时 ，累计10条/天.");
        errorInfo.put("isv.INVALID_JSON_PARAM", "JSON参数不合法，只接受字符串值");
        errorInfo.put("isv.BLACK_KEY_CONTROL_LIMIT", "黑名单管控");
        errorInfo.put("isv.PARAM_LENGTH_LIMIT", "参数超出长度限制");
        errorInfo.put("isv.PARAM_NOT_SUPPORT_URL", "不支持URL");
        errorInfo.put("isv.AMOUNT_NOT_ENOUGH", "账户余额不足");
        errorInfo.put("isv.TEMPLATE_PARAMS_ILLEGAL", "模板变量里包含非法关键字");
    }


    public static Map<String, String> getErrorInfo() {
        return errorInfo;
    }

    public static void setErrorInfo(Map<String, String> errorInfo) {
        AliSmsErrorHelper.errorInfo = errorInfo;
    }
}
